import request from '@/utils/requestUtil'

export function fetchAddressList() {
	return request({
		method: 'GET',
		url: '/mall-admin/member/address/list'
	})
}
/**
 * @param {Object} id地址回显
 */
export function fetchAddressDetail(id) {
	return request({
		method: 'GET',
		url: `/mall-admin/member/address/${id}`
	})
}

export function addAddress(data) {
	return request({
		method: 'POST',
		url: '/mall-admin/member/address/add',
		data:data
	})
}

export function updateAddress(data) {
	return request({
		method: 'POST',
		url: `/mall-admin/member/address/update/${data.id}`,
		data:data
	})
}

export function deleteAddress(id) {
	return request({
		method: 'POST',
		url: `/mall-admin/member/address/delete/${id}`
	})
}
/**
 * 智能搜索 
 */
export function seekAddress(dates) {
	return request({
		method: 'POST',
		url: '/mall-es/member/address/seek/' + dates,
		
	})
}


